- stylesheet('wiki_page_style')
- title(wt 'Editing wiki page')

- if params[:preview]
  %div{:class => "wiki_content"}
    = wiki_content @page.content

- wiki_page_form do |f|
  = f.hidden_field :previous_version_number, :value => f.object.last_version_number
  #error_messages
    = f.error_messages
 
  %span{:id => "options-wiki", :style => "display:none;"}
    %p
      = wt 'Title:'
      %br
      = f.text_field :title
    %p
      =wt 'Path:'
      %br
      = f.text_field :path
  %p
    = wt 'Content:'
    = link_to "(modifica titolo e percorso)", "javascript:toggle('options-wiki');"
    = f.text_area :content
  %p
    = wt 'Comment on this change (optional):'
    = f.text_field :comment
  %input{:type => "submit", :name =>"save", :value => wt('Save page'), :class => "submit"}
  %input{:type => "submit", :name =>"preview", :value => wt('Preview'), :class => "submit"}
  %input{:type => "submit", :name =>"cancel", :value => wt('Cancel'), :class => "submit"}

-#= wiki_page_attachments(@page)
